<?php
include("includes/header.php") ?>
<title>LazySwim</title>
</head>

<body>
<div id="page">
    <div id="page-top">
        <div id="page-bottom">
          <div id="header">
                <div id="header-info">
                    <h1>LAZYSWIM</h1>
                    <div class="description">Simplistic Swim System</div>
                </div>
				<!-- Header Goes Here -->
                <?php printHeader(); ?>
				<!-- Header Ends Here -->
                <div id="header-date">Today is <?php echo date('l, F jS, Y'); ?></div>
                <div id="header-cats">
				<!-- Welcome Message Starts Here -->
                    <ul>
					<?php include("includes/welcomeBar.php"); ?>
					</ul>
				<!-- Welcome Message Ends Here -->	
                </div>
            </div>
            <div id="main">

                <div id="sidebar">
                    <?php
					// include the corresponding navigation page
                    include("includes/navigation.php");
					?>     
                </div>

<!-- main body -->

                <div class="featured-post">
                    <div class="post-title">
                        <h2><?php echo $currentPageTitle; ?></h2>
						<?php if($_SESSION['ls_accounttype'] == "manager") { ?>
                        <div class="post-title-info">
                            <div class="post-comments"><a href="editpage.php?page=<?php echo $currentPageURL; ?>">Edit This Page</a></div>
                        </div>
						<?php } ?>
                    </div>
                    <div class="post-entry">
					<?php
					require("includes/dbInfo.php");
					
					$page_sql = mysql_query("SELECT html from htmlPages where url = '$currentPageURL'") 
						or die(mysql_error());
							
					//display HTML code stored in database for this page
					while( $row = mysql_fetch_array($page_sql)) {
						echo $row[html];
					}
					?>
                    </div>
                </div>
             
                <div class="clear"></div>

            </div>
			<!-- Footer Goes Here -->
            <?php include("includes/footer.php"); ?>
			<!-- Footer Ends Here -->
        </div>
    </div>
</div>
</body>
</html>
